package 笔试.爱奇艺;

import java.util.Scanner;

/**
 * 爱奇艺笔试第一题：滑动窗口求平均值
 */
public class WindowAvg {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        String[] arr = str.split(":");
        String[] split = arr[0].split(",");
        int[] nums = new int[split.length];
        for (int i=0;i<split.length;i++){
            nums[i] = Integer.valueOf(split[i]);
        }
        int k = Integer.valueOf(arr[1]);
        //int[] avgs = new int[nums.length-k+1];
        double ret = Double.MIN_VALUE;
        double avg = 0;
        double sum = 0;
        int l=0;
        int r = 0;
        while(r<nums.length){
            sum+=nums[r++];
            if(r-l==k){
                double avgNow = sum/k;
                if(avg!=0){
                    double aa = (avgNow-avg)/avg;
                    ret = Math.max(aa,ret);
                }
                avg = avgNow;
                sum -= nums[l++];
            }
        }
        ret *= 100;
        //最后转化为%的字符串
        String ans = String.format("%.2f",ret);
        System.out.println(ans+"%");

    }
}
